package com.example.exerciseintelligenttransportation;

import android.content.Intent;
import android.os.Bundle;
import android.widget.ImageView;

import androidx.appcompat.app.AppCompatActivity;

import java.util.Timer;
import java.util.TimerTask;

public class GuideActivity extends AppCompatActivity {
    static boolean flag = true;

    private ImageView ivMainFlash;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_guide);
        initView();
        Timer timer = new Timer();
        TimerTask timerTask = new TimerTask() {
            public void run() {
                Intent intent = new Intent(getApplicationContext(), RegisterActivity.class);
                startActivity(intent);
                finish();
            }
        };
        if (flag){
            timer.schedule(timerTask, 3000);
            flag =false;
        }else {
            timer.schedule(timerTask,0);
        }


    }


    private void initView() {
        ivMainFlash = (ImageView) findViewById(R.id.iv_main_flash);
    }
}